package com.xhui.vimarket.zkplus.zul.attr.mod.impl;t java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.directwebremoting.util.Logger;
import org.zkoss.zk.ui.Component;
com.xhui.vimarket.zkplusui.vimarket.zkplus.zul.attrcom.xhui.vimarket.zkplusrt com.xhui.vimarket.zkplus.zul.acom.xhui.vimarket.zkplusst;
import com.xhui.vimarket.zkpcom.xhui.vimarket.zkplusan.AttrTmpl;
import com.xhui.vimarket.zkplus.zul.attr.mod.AttrCompFactorcom.xhui.vimarket.zkplus版权：福富软件 版权所有 (c) 2010
 * @文件：com.xhui.vimarket.zkplus.zul.attr.mod.impl.AttrLayoutComp.java
 * @所含类：
 * @author: wuyx
 * @version: V1.0
 * @see:
 * @创建日期：2010-12-20
 * @功能说明：属性控件接口
 * @修改记录： =============================================================<br>
 *        日期:2010-12-20 创建
 *        =============================================================<br>
 */
public class AttrLayoutComp extends AttrBaseComp {
    
    /**
     * 实例.
     */
    private static AttrLayoutComp inst   = new AttrLayoutComp();
    /**
     * 日志.
     */
    private static Logger         logger = Logger.getLogger(AttrLayoutComp.class);
    
    /**
     * 构造函数. 
     */
    private AttrLayoutComp() {
    }
    
    /**
     * 获取实例.
     * 
     * @return AttrBaseComp
     */
    public static AttrLayoutComp instance() {
        return AttrLayoutComp.inst;
    }
    
    /**
     * 生成组件.
     * 
     * @param attrExt 组件控件
     * @param attrTmpl 组件模板
     * @param comp 显示容器组件
     */
    @Override
    public void create(final AttrExt attrExt, final AttrTmpl attrTmpl, final Component comp) {
        super.create(attrExt, attrTmpl, comp);
        final int sum = attrTmpl.getAttrTmplListCount();
        for (int i = 0; i < sum; i++) {
            final AttrTmpl subAttrTmpl = attrTmpl.getAttrTmplList(i);
            AttrCompFactory.getInst(subAttrTmpl.getDisplayMode())
                .create(attrExt, subAttrTmpl, comp);
        }
        
        super.afterCreate(attrExt, attrTmpl, comp);
    }
    
    /**
     * 设置值.
     * 
     * @param attrExt 组件控件
     * @param comp 组件
     * @param attrInst 属性实例
     */
    @Override
    public void setValue(final AttrExt attrExt, final Component comp,
        final List<AttrInst> attrInstList,final Map<String, Integer> attrViewMap) {
        super.setValue(attrExt, comp, attrInstList, attrViewMap);
        
    }
    
    /**
     * 获取值.
     * 
     * @param attrExt 组件控件
     * @param comp 组件
     * @return ArrayList<AttrInst>
     */
    @Override
    public ArrayList<AttrInst> getValue(final AttrExt attrExt, final Component comp) {
        super.getValue(attrExt, comp);
        return null;
    }
    
}
